}
else
{
- if (line_display->pg_bg_rgba)
+ if (line_display->pg_bg_rgba_set)
{
cairo_t *cr = text_renderer->cr;
cairo_save (cr);
- gdk_cairo_set_source_rgba (text_renderer->cr, line_display->pg_bg_rgba);
+ gdk_cairo_set_source_rgba (text_renderer->cr, &line_display->pg_bg_rgba);
cairo_rectangle (cr,
line_display->left_margin, selection_y,
screen_width, selection_height);
pango_layout_set_wrap (display->layout, pango_wrap);
}
display->total_width = MAX (layout->screen_width, layout->width) - h_margin - h_padding;
-
+
if (style->pg_bg_rgba)
- display->pg_bg_rgba = gdk_rgba_copy (style->pg_bg_rgba);
+ {
+ display->pg_bg_rgba = *style->pg_bg_rgba;
+ display->pg_bg_rgba_set = TRUE;
+ }
else
- display->pg_bg_rgba = NULL;
+ {
+ display->pg_bg_rgba_set = FALSE;
+ }
}
static PangoAttribute *
if (display->cursors)
g_array_free (display->cursors, TRUE);
- if (display->pg_bg_rgba)
- gdk_rgba_free (display->pg_bg_rgba);
-
g_slice_free (GtkTextLineDisplay, display);
}
}